package com.kma.summer2012.client.events.reject;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.kma.summer2012.shared.model.UICrumbsRequest;

public class RejectRequestEvent extends GwtEvent<RejectRequestEvent.RejectRequestEventHandler> {
    private static Type<RejectRequestEventHandler> TYPE = new Type<RejectRequestEventHandler>();

    public UICrumbsRequest getRequest() {
        return request;
    }

    public UICrumbsRequest request = null;

    public RejectRequestEvent(UICrumbsRequest request) {
        this.request = request;
    }

    public RejectRequestEvent() {
        //To change body of created methods use File | Settings | File Templates.
    }

    @Override
    public Type<RejectRequestEventHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(RejectRequestEventHandler rejectEventHandler) {
        rejectEventHandler.OnReject(this);
    }

    public static Type<RejectRequestEventHandler> getType() {
        return TYPE;
    }

    public interface RejectRequestEventHandler extends EventHandler {
        void OnReject(RejectRequestEvent event);
    }
}